package com.cloudkinto.service.user;

import com.cloudkinto.common.web.PageResult;
import com.cloudkinto.common.web.SingleResult;
import com.cloudkinto.entity.UserDo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cloudkinto.service.user.vo.*;
import com.cloudkinto.service.user.wxvo.ScanningCodeRes;
import com.cloudkinto.service.user.wxvo.WxTemplatePushReq;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  service接口
 * </p>
 * @author 张永远
 * @since 2020-05-27
 */
public interface UserService extends IService<UserDo> {

    //用户登录
    UserLoginSuccessRes login(UserLoginReq req, HttpServletRequest request);

    //退出登录
    void logout(String token);

    //用户注册
    UserRegisterReq register(UserRegisterReq req);

    void createRoleForCompany();

    SingleResult bindKeyInit();

    SingleResult keySecret(Long plantFormId,Long shopId);

    SingleResult shopListFromPlantForm(Long plantFormId);

    SingleResult addInit();

    UserBuildReq add(UserBuildReq req, Long userId,Long companyId);

    void check(UserCheckReq req,Long userId);

    SingleResult updateInit(Long id);

    UserUpdateReq update(UserUpdateReq updateVo, Long userId);

    UpdatePasswordReq updatePassword(UpdatePasswordReq req ,Long userId);

    SingleResult bindKey(UserBindReq req,Long userId);

    int delete(Long id, Long userId);

    SingleResult verificationCode();

    SingleResult pageInit();

    List<UserListPageRes> getList(Map<String, String> map);

    PageResult getListPage(Map<String, String> map);

    UserLoginSuccessRes main(String token);

    Object pdaLogin(UserPdaLoginReq req);

    Object detail(Long id, Long userId);

    /***********************微信功能区*************************/

    String createTicket(Long userId);

    String scanningCode(String request);

    SingleResult whetherScan(ScanningCodeRes req);

    SingleResult whetherBindingScan(ScanningCodeRes req);

    void sendWxMsg(WxTemplatePushReq req);

    SingleResult getLoginMsg(Long userId);
}
